[#include "/WEB-INF/pages/common/taglibs.ftl"]
<div id="categoryContent" class="category_content">
	<a href="${action.backurl}" >返回</a>
	<form action="[@c.url value="/manage/Category_${act}.action"/]?backurl=${action.backurl}" method="post">
		<input type="hidden" name="category.id" value="${(category.id)!''}" />
		<input type="hidden" name="id" value="${(category.id)!''}" />
		<table>
			<caption>栏目的数据内容</caption>
				<tr>
					<th>所属频道：[#--[@fmt.message key="manage.category"/] --]</th>
					<td>
						<select name="category.channelId" class="" [#if act=='update']readonly="readonly"[/#if]>
						[#list channelList as c]
							<option value="${c.id}" [#if (category != null && category.channelId == c.id) || (channelId == c.id)]selected='selected'[/#if] >${c.title}</option>
						[/#list]
						</select>
					</td>
					<th>类型：[#--[@fmt.message key="manage.article.type"/]--]</th>
					<td><input type="text" placeholder="?" name="category.type" value="${(category.type)!''}"/></td>
				</tr>
				<tr>
					<th>父栏目：[#--[@fmt.message key="manage.category"/] --]</th>
					<td>
						<select name="category.pid" class="" [#if act=='update']readonly="readonly"[/#if]>
							<!--<option value=""></option>-->
						[#list categoryList as c]
							<option value="${c.id}" [#if category != null && category.pid == c.id]selected='selected'[/#if] >${c.name}</option>
						[/#list]
						</select>
					</td>
					<th>路径：[#--[@fmt.message key="manage.category"/] --]</th>
					<td><input type="text" name="category.path" value="${(category.path)!''}"/></td>
				</tr>
				<tr>
					<th>名称：[#--[@fmt.message key="manage.category"/] --]</th>
					<td>
						<input type="text" name="category.name" value="${(category.name)!''}"/>
					<th>标题：[#--[@fmt.message key="manage.article.type"/]--]</th>
					<td><input type="text" placeholder="?" name="category.title" value="${(category.title)!''}"/></td>
				</tr>	
				<tr>
					<th>关键字：[#--[@fmt.message key="manage.article.type"/]--]</th>
					<td><input type="text" placeholder="?" name="category.keyWords" value="${(category.keyWords)!''}"/></td>
					<th>发布：</th>
					<td><select name="category.draft">
							<option value="true" [#if category == null || category.draft == true]selected="selected"[/#if] >草稿</option>
							<option value="false" [#if (category != null && category.draft == false)]selected="selected"[/#if] >正式</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>模板</th>
					<td colspan="3">
						<select name="category.templateId">
							<!--<option value=""></option>-->
							[#list templateList as template]
								<option value="${template.id}" [#if (category.templateId) ?? && template.id ==category.templateId]selected="selected"[/#if]>${template.path}/${template.name}</option>
							[/#list]
						</select>&nbsp;<input type="button" value="编辑"/>&nbsp;
					</td>
				</tr>
				<tr>
					<th>可用：</th>
					<td>
						<label for="" >可用</label><input type="radio" name="category.enabled" value="true" [#if category == null || (category.enabled ==true)]checked[/#if]/>
						<label for="" >禁用</label><input type="radio" name="category.enabled" value="false" [#if (category != null && category.enabled == false)]checked[/#if]/>
					</td>
					<th>访问许可：</th>
					<td>
						<label for="" >需要访问许可</label><input type="radio" name="category.permission" value="true" [#if category == null || (category.permission ==true)]checked[/#if]/>
						<label for="" >公开</label><input type="radio" name="category.permission" value="false" [#if (category != null && category.permission == false)]checked[/#if]/>
					</td>
				</tr>
				<tr>
					<th>状态：</th>
					<td>
						<input type="text" name="category.status" value="${(category.status)!''}"/>
					</td>
					<th>语言：</th>
					<td>
						<select name="category.i18n">
							[#list configI18N.configItemList as item]
								<option value="${item.value}" [#if (category.i18n)?? && item.value==category.i18n]selected="selected"[/#if]>${item.name}</option>
							[/#list]
						</select>
					</td>
				</tr>
				<tr>
					<th>描述</th>
					<td colspan="3"><textarea  maxlength="255" name="category.description">${(category.description)!''}</textarea></td>
				</tr>
				<tr>
					<th></th>
					<td colspan=3><input type="submit" value="提交"/>|<input id="templateReview" class="category_review" type="button" value="预览"/></td>
				</tr>
		</table>
	</form> 
</div>